import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 客户分组
 */
@Entity('customer_group')
export class CustomerGroupEntity extends BaseEntity {
  @Index()
  @Column({ comment: '名称', length: 255 })
  name: string;

  @Column({ comment: '排序值', default: 0 })
  orderValue: number;

  @Column({ comment: '备注', nullable: true, type: 'text' })
  remark: string;

  @Index()
  @Column({ comment: '创建人', nullable: true })
  userId: number;

  @Column({ comment: '客户数量', default: 0 })
  customerCount: number;
}
